package gateway.exception;///**
// *
// */
//package com.parking.gateway.exception;
//
//import com.parking.gateway.exception.GatewayApiException;
//import com.parking.gateway.exception.GatewayInsertException;
//import org.springframework.http.HttpStatus;
//import org.springframework.web.bind.annotation.ControllerAdvice;
//import org.springframework.web.bind.annotation.ExceptionHandler;
//import org.springframework.web.bind.annotation.ResponseBody;
//import org.springframework.web.bind.annotation.ResponseStatus;
//
//import java.util.HashMap;
//import java.util.Map;
//
//@ControllerAdvice
//public class ControllerExceptionHandler {
//
//	@ExceptionHandler(GatewayApiException.class)
//	@ResponseBody
//	@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
//	public Map<String, Object> handleGatewayApiException(GatewayApiException ex) {
//		Map<String, Object> result = new HashMap<>();
//		result.put("message", ex.getMessage());
//		return result;
//	}
//	@ExceptionHandler(GatewayInsertException.class)
//	@ResponseBody
//	@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
//	public Map<String, Object> handleGatewayInsertException(GatewayInsertException ex) {
//		Map<String, Object> result = new HashMap<>();
//		result.put("message", ex.getMessage());
//		return result;
//	}
//}
